<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:p="http://primefaces.prime.com.tr/ui"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:ui="http://java.sun.com/jsf/facelets" 
      xmlns:f="http://java.sun.com/jsf/core">
    <h:head>
        <title>Register Page</title>
        
    </h:head>
    <h:body>
        <ui:composition>
        <div style="margin: 0 auto;text-align: center;border-style: none">   
            <h:form id="registCompanyPreform" onsubmit="">
                <p:wizard widgetVar="wizpre" flowListener="#{regisPreCompanyWizard.onFlowProcess}">
                    <p:tab id="Plan" title="Plan">
                        <p:panel header="Choose Plan">  
                            <h:messages style="color : red"/>
                                <h:outputText value="Select your payment plan"/>
                                <h:selectOneRadio value="#{regisPreCompanyWizard.plan}" required="true">
                                    <f:selectItem itemValue="month" itemLabel="Monthly"/>                  
                                                <f:selectItem itemValue="quarter" itemLabel="Quarterly"/>
                                </h:selectOneRadio>
                                <h:outputText value="Basic Member cost 15$/month"/><br/>
                                <h:outputText value="Basic Member cost 40$/quarter .SAVING YOUR MONEY"/>                                
                        </p:panel>  
                    </p:tab>  
                    <p:tab id="Details" title="Details">
                        <p:panel header="Information Details">  
                            <h:messages errorClass="error"/>  
                            <h:panelGrid columns="2" columnClasses="label, value">  
                                <h:outputText value="Company Name :" />  
                                <p:inputText id="name" value="#{regisPreCompanyWizard.com.companyname}" required="true" requiredMessage="Company Name cannot be blank">
                                    <f:validateLength for="name" minimum="4" maximum="50"/>
                                </p:inputText>
                             
                                <h:outputText value="Designation : " />
                                <p:inputText id="designation" value="#{regisPreCompanyWizard.com.designation}" required="true" requiredMessage="Designation cannot be blank">
                                    <f:validateLength for="designation" minimum="4" maximum="50"/>
                                    </p:inputText>
                                
                                <h:outputText value="Fax : " />
                                <p:inputText id="fax" value="#{regisPreCompanyWizard.com.fax}" required="true" requiredMessage="Fax cannot be blank">
                                    <f:validateLength for="fax" minimum="4" maximum="50"/>
                                    </p:inputText>
                                
                            </h:panelGrid>  
                        </p:panel>  
                    </p:tab>
<!--                    <p:tab id="Image" title="Image">
                        <p:panel header="Upload your Company Logo">
                            <h:form>
                            <h:messages errorClass="error"/> 
                            <h:panelGrid columns="2" columnClasses="label, value">
                                <h:outputText value="Image: " />  
                                <p:fileUpload fileUploadListener="#{regisPreCompanyWizard.handleFileUpload(event)}"/> 
                                
                            </h:panelGrid>
                            </h:form>
                        </p:panel>
                    </p:tab>-->
                    <p:tab id="Confirmation" title="Confirmation">
                        <p:panel header="Confirmation">
                            <p:growl id="growl" sticky="true" showDetail="true"/>  
                            <h:panelGrid id="confirmation" columns="4" width="200" bodyrows="10" cellspacing="15">
                                <h:outputText value="Plan: " style="font-style: oblique"/>
                                <h:outputText value="#{regisPreCompanyWizard.plan}"/>

                                <h:outputText value="Name: " style="font-style: oblique"/> 
                                <h:outputText value="#{regisPreCompanyWizard.com.companyname}"/> 

                                <h:outputText value="Designation: " style="font-style: oblique"/>  
                                <h:outputText value="#{regisPreCompanyWizard.com.designation}"/>  

                                <h:outputText value="Fax: " style="font-style: oblique"/>  
                                <h:outputText value="#{regisPreCompanyWizard.com.fax}"/>  

<!--                                <h:outputText value="Image: " style="font-style: oblique"/>  
                                <p:graphicImage value="#{regisPreCompanyWizard.com.img}"/> -->

                                
                            </h:panelGrid>
                            <p:commandButton value="Submit" update="growl"   
                                             actionListener="#{regisPreCompanyWizard.save}" process="@this"/>
                        </p:panel>
                    </p:tab>
                </p:wizard>
                <p:ajaxStatus>  
                    <f:facet name="start">  
                        <h:graphicImage value="./../CSS/images/4Web/ajax-loader.gif" />  
                    </f:facet>  

                    <f:facet name="complete">  
                        <h:outputText value="" />  
                    </f:facet>  
                </p:ajaxStatus>
            </h:form>
        </div>
            </ui:composition>
    </h:body>
</html>

